<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <link rel="icon" type="image/x-icon" href="/images/logoRed.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>主页</title>
    <link rel="stylesheet" th:href="@{/static/layuiadmin/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/static/layuiadmin/style/admin.css}" media="all">
    <link rel="stylesheet" th:href="@{/static/css/common.css}">
</head>

<body>

<div th:replace="include/pagination::header"></div>

<div class="layui-fluid" style="padding-top: 15px;">
    <div class="layui-card">
        <div class="layui-card-header">当前位置：<span id="tvFP">/</span><span id="tvFPId" hidden>/</span></div>
        <div class="layui-card-body">
            <div class="btnDiv">
                <button id="btnBack" class="layui-btn layui-btn-sm layui-btn-primary icon-btn"><i class="layui-icon">&#xe65c;</i>返回上级
                </button>
                <button id="btnRefresh" class="layui-btn layui-btn-sm layui-btn-primary icon-btn"><i class="layui-icon">&#xe669;</i>刷新
                </button>
                <button  id="btnUpload" class="layui-btn layui-btn-sm layui-btn-normal icon-btn"><i class="layui-icon">&#xe681;</i>上传文件
                </button>
                <button  id="fileSearch" class="layui-btn layui-btn-sm layui-btn-normal icon-btn"><i class="layui-icon">&#xe615;</i>搜索文件
                </button>

                <button style="display: none" id="btnDilaog" class="layui-btn layui-btn-sm layui-btn-primary icon-btn"><i class="layui-icon">&#xe634;</i>弹窗选择
                </button>
            </div>
            <hr>
            <div class="file-list">

            </div>
        </div>
    </div>
</div>

<!-- 下拉菜单 -->
<div class="dropdown-menu dropdown-anchor-top-left" id="dropdownFile">
    <div class="dropdown-anchor"></div>
    <ul>
        <li><a id="open"><i class="layui-icon layui-icon-file"></i>&emsp;查看&emsp;</a></li>
        <li><a id="download"><i class="layui-icon layui-icon-download-circle"></i>&emsp;下载&emsp;</a></li>
        <li><a id="del"><i class="layui-icon layui-icon-delete" style="font-size: 19px;"></i>&nbsp;&nbsp;&nbsp;删除&emsp;</a></li>
    </ul>
</div>

<div class="layui-footer layui-text">

</div>

<script type="text/html" id="uploadShardModel">
    <div class="layui-upload my-form">
        <button type="button" class="layui-btn layui-btn-normal" id="uploadShardList">选择多文件</button>
        <div class="layui-upload-list">
            <table class="layui-table">
                <thead>
                <tr>
                    <th width="20%">文件名</th>
                    <th width="10%">大小</th>
                    <th width="10%">状态</th>
                    <th width="40%">进度</th>
                    <th width="20%">操作</th>
                </tr>
                </thead>
                <tbody id="uploadList"></tbody>
            </table>
        </div>
        <button type="button" class="layui-btn" id="testListAction">开始上传</button>
    </div>
</script>
<!-- 渲染模板 -->
<script id="fileTpl" type="text/html">
    {{#  layui.each(d, function(index, item){ }}
    <div class="file-list-item" data-id="{{item.fileId}}" data-dir="{{item.isDir}}" data-url="{{item.filePath}}" data-name="{{item.fileName}}">
        <div class="file-list-img">
            {{# if(item.isImg==0){ }}
            <img src="{{item.filePath}}"/>
            {{# }else{ }}
            <img src="/static/images/fti/{{item.fileExtension}}.png"/>
            {{# } }}
        </div>
        <div class="file-list-name">
            {{# if(item.isDir){ }}
            {{item.fileName}}
            {{# }else{ }}
            {{item.fileName}}
            {{# } }}
        </div>
    </div>
    {{#  }); }}
    {{# if(d.length<=0){ }}
    <div class="list-empty">
        <i class="layui-icon layui-icon-face-surprised"></i>
        <div>没有文件</div>
    </div>
    {{# } }}
</script>

<script th:src="@{/static/layuiadmin/layui/layui.all.js}"></script>
<script type="text/javascript" th:src="@{/static/js/clipboard.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/index.js}"></script>

</body>
</html>
